package com.zby.model.pojo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.autotable.annotation.AutoColumn;
import org.dromara.autotable.annotation.AutoTable;
import org.dromara.autotable.annotation.Index;
import org.dromara.autotable.annotation.TableIndex;
import org.dromara.autotable.annotation.enums.IndexTypeEnum;

/**
 * @TableName category
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AutoTable(comment = "分类")
@TableIndex(fields = {"name", "deleted"})
@Schema(description = "分类")
public class Category extends BasePojo {
    @Schema(description = "分类名称")
    @Index(type = IndexTypeEnum.UNIQUE)
    @AutoColumn(length = 30, notNull = true, comment = "分类名称")
    private String name;

    @Schema(description = "分类描述")
    @AutoColumn(length = 200, comment = "分类描述")
    private String description;
}
